<?
Class Util {
	private $ci;
	private $config;
	function __construct() {
		$this -> ci = &get_instance();

	}

	public function getPathCSS() {

	}

	public function getImagePath($imageName) {
		return base_url() . "asset/images/" . $imageName;
	}

	public function getUserName() {
		return $this -> ci -> session -> userdata("sale_name");
	}

	public function getUserID() {
		return $this -> ci -> session -> userdata("sale_no");
	}

	public function convertValue($value) {
		$pos = strpos($value, "-");
		if ($pos == false) {
			return $value;
		} else {
			return str_replace("-", "", $value) * -1;
		}
	}

	public function canAction($postBy) {
		return ($postBy == $this -> ci -> session -> userdata("userID") || $this -> ci -> session -> userdata("level_id") == "Admin");
	}
	

}
?>